/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.z100h.supplychain.evidence.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.z100h.supplychain.evidence.entity.StockoutResource;
import com.z100h.supplychain.evidence.mapper.StockoutResourceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;


/**
 * 出库单资源明细Service
 * @author madara
 * @version 2019-01-19
 */
@Service
@Transactional(readOnly = true)
public class StockoutResourceService extends CrudService<StockoutResourceMapper, StockoutResource> {

	@Autowired
	private StockoutResourceMapper stockoutResourceMapper;

	public StockoutResource get(String id) {
		return super.get(id);
	}
	
	public List<StockoutResource> findList(StockoutResource stockoutResource) {
		return super.findList(stockoutResource);
	}
	
	public Page<StockoutResource> findPage(Page<StockoutResource> page, StockoutResource stockoutResource) {
		return super.findPage(page, stockoutResource);
	}
	
	@Transactional(readOnly = false)
	public void save(StockoutResource stockoutResource) {
		super.save(stockoutResource);
	}
	
	@Transactional(readOnly = false)
	public void delete(StockoutResource stockoutResource) {
		super.delete(stockoutResource);
	}

	@Transactional(readOnly = false)
	public void addStockoutResource(String evidenceId){
		Map<String,Object> param=new HashMap<>();
		param.put("evidenceId",evidenceId);
		stockoutResourceMapper.addStockoutResource(param);
	}
}